package cn.edu.qzuie.artist.module.td.dal.dataobject.student;

import cn.edu.qzuie.artist.framework.excel.core.annotations.DictFormat;
import cn.edu.qzuie.artist.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelProperty;
import com.sun.xml.bind.v2.TODO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.edu.qzuie.artist.framework.mybatis.core.dataobject.BaseDO;

/**
 * 学生 DO
 *
 * @author 泉信管理员
 */
@TableName("td_student")
@KeySequence("td_student_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class StudentDO extends BaseDO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "28080")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "学号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("学号")
    private String studentNo;

    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("密码")
    private String password;

    @Schema(description = "手机")
    @ExcelProperty("手机")
    private String mobile;

    @Schema(description = "艺名", example = "芋艿")
    @ExcelProperty("艺名")
    private String nickName;

    @Schema(description = "真实姓名", example = "赵六")
    @ExcelProperty("真实姓名")
    private String realName;

    @Schema(description = "生日", example = "2025-10-10")
    @ExcelProperty("生日")
    private LocalDate birthday;

    @Schema(description = "性别")
    @ExcelProperty(value = "性别", converter = DictConvert.class)
    @DictFormat("system_user_sex") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer gender;

    @Schema(description = "入校时间")
    @ExcelProperty("入校时间")
    private LocalDate incoming;

    @Schema(description = "QQ")
    @ExcelProperty("QQ")
    private String qq;

    @Schema(description = "头像")
    @ExcelProperty("头像")
    private String headerPic;

    @Schema(description = "状态")
    @ExcelProperty(value ="状态", converter = DictConvert.class)
    private Integer studentState;

    @Schema(description = "邮件")
    @ExcelProperty("邮件")
    private String email;

    @Schema(description = "专业编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("专业编号")
    private Long majorId;

    @Schema(description = "班级编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("班级编号")
    private Long classinfoId;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}